import WebGL from "three/examples/jsm/capabilities/WebGL.js";
/**
 * @description webgl兼容性检测
 * @param {Element | undefined} container - 容器
 * @returns {boolean}
 */
export const compatibilityCheck = (container = undefined) => {
  const isWebGLAvailable = WebGL.isWebGLAvailable();
  if (!isWebGLAvailable && container) {
    const warning = WebGL.getWebGLErrorMessage();
    container.appendChild(warning);
  }
  return isWebGLAvailable;
};
